<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>index</title>
<style type="text/css">
body {
		font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: #4f6b72;
		background: #E6EAE9;
}

a {
		color: #c75f3e;
}

#mytable {
		padding: 0;
		margin: 0;
}

caption {
		padding: 0 0 5px 0;
		width: 700px;
		font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		text-align: right;
}

th {
		font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: #4f6b72;
		border-right: 1px solid #C1DAD7;
		border-bottom: 1px solid #C1DAD7;
		border-top: 1px solid #C1DAD7;
		letter-spacing: 2px;
		text-transform: uppercase;
		text-align: left;
		padding: 6px 6px 6px 12px;
		background: #CAE8EA;
}

th.nobg {
		border-top: 0;
		border-left: 0;
		border-right: 1px solid #C1DAD7;
		background: none;
}

td {
		border-right: 1px solid #C1DAD7;
		border-bottom: 1px solid #C1DAD7;
		background: #fff;
		font-size: 11px;
		padding: 6px 6px 6px 12px;
		color: #4f6b72;
}

td.alt {
		background: #F5FAFA;
		color: #797268;
}

th.spec {
		border-left: 1px solid #C1DAD7;
		border-top: 0;
		background: #fff;
		font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

th.specalt {
		border-left: 1px solid #C1DAD7;
		border-top: 0;
		background: #f5fafa;
		font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: #797268;
}

body.td {
		font-size: 11px;
}
</style>
</head>
<body>
<table border="1" width="100%">
		<caption>流程定义</caption>
		<thead>
				<tr>
						<th class="spec">流程id</th>
						<th>流程名称</th>
						<th>版本号</th>
						<th>流程编辑</th>
						<th>流程删除</th>
						<th>启动流程</th>
				</tr>
		</thead>
		<tbody>
				<s:iterator value="processDefinitionList">
						<tr>
								<th class="spec">${id }</th>
								<th class="alt">${name }</th>
								<th class="alt">${version }</th>
								<th class="alt">
									<a href="workflow!initAddWorkFlowPage.do?deploymentDbid=${deploymentId }">编辑流程</a>
								</th>
								<th class="alt"><!-- 在定义流程中，删除的是整个部署 ，所以传定义的部署id--> 
									<a href="remove.html?id=${deploymentId }">删除流程</a>
								</th>
								<th class="alt">
									<a href="start.html?id=${id }">启动流程</a>
								</th>
						</tr>
				</s:iterator>
		</tbody>
</table>

<table border="1" width="100%">
		<caption>流程实例</caption>
		<thead>
				<tr>
						<td>id</td>
						<td>activity</td>
						<td>state</td>
						<td>&nbsp;</td>
				</tr>
		</thead>
		<tbody>
				<s:iterator value="processInstanceList">
						<tr>
								<td>${id }</td>
								<td><s:property value="findActiveActivityNames()" /></td>
								<td>${state }</td>
								<td><a href="view.html?id=${id }">查看</a></td>
						</tr>
				</s:iterator>
		</tbody>
</table>

<table border="1" width="100%">
		<caption>待办任务</caption>
		<thead>
				<tr>
						<td>id</td>
						<td>name</td>
						<td>&nbsp;</td>
				</tr>
		</thead>
		<tbody>
				<s:iterator value="taskList">
						<tr>
								<td>${id }</td>
								<td>${name }</td>
								<td><!-- getFormResourceName从xml文件中取值 --> <a href="${formResourceName }?id=${id}">处理</a></td>
						</tr>
				</s:iterator>
		</tbody>
</table>
</body>
</html>
